package com.dense.kuiniu.floatcabinet.mvp.contract;

import com.dense.kuiniu.floatcabinet.mvp.http.entity.BaseResponse;
import com.dense.kuiniu.floatcabinet.mvp.http.entity.Book;
import com.dense.kuiniu.floatcabinet.mvp.http.entity.BorrowBackResult;
import com.dense.kuiniu.floatcabinet.mvp.http.entity.Inventory;
import com.dense.kuiniu.floatcabinet.mvp.http.entity.Reader;
import com.dense.kuiniu.floatcabinet.mvp.http.post.BorrowOrBackBody;
import com.dense.kuiniu.floatcabinet.mvp.http.post.InventoryBody;
import com.jess.arms.mvp.IModel;
import com.jess.arms.mvp.IView;

import java.util.List;

import io.reactivex.Observable;

/**
 * @author Administrator
 * @date 2020/11/11
 */
public interface BusinessContract {
    interface View extends IView {

    }

    interface Model extends IModel {
        public Observable<BorrowBackResult> borrowOrBack(BorrowOrBackBody borrow, BorrowOrBackBody back);

        public Observable<BaseResponse<Reader>> borrow(BorrowOrBackBody borrow);

        public Observable<BaseResponse<List<Book>>> back(BorrowOrBackBody borrow);

        public Observable<BaseResponse<Inventory>> inventory(InventoryBody body);

        public void saveInventory(Inventory inventory);
    }
} 